
<style>

 ul.tree, ul.tree ul {
     list-style-type: none;
     background: url(vline.png) repeat-y;
     margin: 0;
     padding: 0;
	 width:200px;
   }
   
  ul.tree ul {
     margin-left: 10px;
   }

   ul.tree li {
     margin: 0;
     padding: 0 12px;
   }
  
</style>
<?php echo $error; ?>

<?php echo form_open_multipart('polizas/upload_file'); ?>

<input type="file" name="userfile" size="20" />
<input type="hidden" name="polizas_id" value="<?php if (!is_null($obj))
    echo $obj->id; ?>" />




<input type="submit" value="Subir Archivo" />
<?php echo form_close();?>


<?php 
$this->load->helper('directory');
if (!is_null($obj)){
   $directory='uploads/'. $obj->id.'/';}else{ $directory='uploads/';
   }
$map = directory_map($directory, FALSE, TRUE);
$this->load->helper('html');



$attributes = array(
                    'class' => 'tree',
                    'id'    => 'files'
                    );

echo fileList('ul',$map, $attributes,0,$directory);

?>